package com.zbzly.mcp.tool;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.context.annotation.Configuration;

import java.time.LocalDateTime;
import java.util.function.Supplier;

@Configuration
public class TimeTool implements Supplier<String> {

    @Tool(name = "获取当前时间",description = "无需传入参数直接 获取本地时间 Outputs this date-time as a String, such as 2007-12-03T10:15:30.")
    @Override
    public String get() {
        System.out.println(LocalDateTime.now().toString()+"time");
        return "现在时间为："+LocalDateTime.now().toString();
    }
}
